home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-22 | 2.0 KB | 55 lines | [TEXT/GEOL] |
- Item 6736576 18-Aug-89 15:28
-
- From: D0568 Poseidon Systems, N Menendez,PRT
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: 2.0ß9 Idle/cohandler problem.
-
-
- We are writing an application that creates multiple event cohandlers that work
- in the idle (continue) of the application. In the idle of each of the
- cohandlers, we receive/send data to windows approximately every second.
-
- The problem is the following: when we compile the program with -Debug on (using
- MacApp 2.0ß9), everything works well; however, if we compile with -noDebug, the
- application seems to startup fine, but starts to put up the watch cursor for
- longer and longer periods of time (if we break into Macsbug, the heap is
- corrupt), and the data being sent to the windows seems to take forever.
-
- If in the idle of the event cohandler we add gApplication.Beep(1);, everything
- works fine after compiled with -noDebug (see code fragment) !!! (with the added
- inconvenience of a beep every second or so)
-
- We thought it was a segmentation problem, and have been trying to resegment the
- application, but the problem persists.
-
- *************************** Code Fragment ***************************
- FUNCTION TInstmtHandler.DoIdle(phase: IdlePhase): BOOLEAN;
- BEGIN
- IF (phase = idleContinue) THEN
- BEGIN
- { ***********
- If we add gApplication.Beep(5); here, code works well under -NoDebug
- }
- IF DataReceived THEN {Routine that indicates data has been
- received}
- BEGIN
- {
- Update Windows…
- }
- END {IF DataReceived}
- ELSE
- BEGIN
- {
- Other idle time tasks…
- }
- END;
- END; {IF - phase = idleContinue}
-
- DoIdle := FALSE;
- END; {TInstmtHandler.DoIdle}
- *****************************************************************
-
-
-